import React from 'react';
interface IProps {
    name: string;
    color: string;
}

type OtherProps = {
    name: string;
    color: string;
};
// 函数声明式写法
function Heading({ name, color }: IProps): React.ReactNode {
    return (
        <h1>
            My Website Heading {name} {color}
        </h1>
    );
}

// 函数扩展式写法
const OtherHeading: React.FC<OtherProps> = ({ name, color }) => (
    <h1>
        My Website Heading {name}, {color}
    </h1>
);
/* eslint-disable import/no-anonymous-default-export */
export default { Heading, OtherHeading };
